import { RouteRecordRaw } from 'vue-router';

import Layout from '../layout/index.vue'
// import Home from '@/views/index.vue'
import Home from '@/views/home/home.vue'

// 根目录
const root = [
  { 
    path: '/',
    name: 'Layout',
    meta:{
      title: '后台面板',
      icon: 'HomeFilled',
    },
    component: Layout,
    children:[
      { 
        path: '/',
        name: 'Home',
        meta:{
          title: '首页',
          icon: 'HomeOutlined',
        },
        component: Home,
      },
      { 
        path: '/about',
        name: 'About',
        meta:{
          title: '关于',
          icon: 'HouBlockOutlinedse',
        },
        component: ()=> import('@/views/ahout/about.vue'),
      },
      { 
        path: '/other',
        name: 'Other',
        meta:{
          title: '其他',
          icon: 'BuildOutlined',
        },
        component: ()=> import('@/views/other/other.vue'),
      },
    ]
  }, 
]

// 开发环境路由
const routesDev: Array<RouteRecordRaw> = [
  ...root
]

export default routesDev